<template>
<div class="wraper">
    <swiper :options="swiperOption">
        <!-- slides -->
        <swiper-slide  v-for = "item of swiperList"  :key = "item.id">
            <img class="swiper-img" :src="item.imgUrl">
        </swiper-slide>
        <!-- Optional controls -->
        <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data: function () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: [{
        id: '001',
        imgUrl: 'https://img1.qunarzz.com/vc/b8/25/51/f6173dbd12c1a0f783abe73855.jpg'
      },
      {
        id: '002',
        imgUrl: 'https://img1.qunarzz.com/vc/5a/8f/69/16cbf52c43d04f6940a6786679.jpg'

      }]
    }
  }}
</script>

<style lang="stylus" scoped>
   .wraper >>>.swiper-pagination-bullet-active
      background :#fff
   .wraper
     width :100%;
     height:0;
     padding-bottom :37%;
     overflow :hidden;
   .swiper-img
     width :100%;
     background :#eee
</style>
